{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pyscf\n",
    "import numpy\n",
    "from pyscf import gto, scf, ci,df,lib\n",
    "import scipy\n",
    "from time import ctime, time"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Total energy:  -56.21735425613152\n",
      "Total job time:       0.10(wall)\n"
     ]
    }
   ],
   "source": [
    "TimeStart = time()\n",
    "mol = gto.Mole(                                                                                               \n",
    "        atom='''\n",
    "         N       -2.1988391019      1.8973746268      0.0000000000                 \n",
    "         H       -1.1788391019      1.8973746268      0.0000000000                 \n",
    "         H       -2.5388353987      1.0925460144     -0.5263586446                 \n",
    "         H       -2.5388400276      2.7556271745     -0.4338224694 ''',\n",
    "        basis='def2-tzvp',verbose=0\n",
    "    ).build()\n",
    "mf = scf.RHF(mol)\n",
    "mf.init_guess = '1e'\n",
    "print(\"Total energy: \",mf.kernel())\n",
    "print(\"Total job time: %10.2f(wall)\" %(time()-TimeStart))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 70,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "System: uname_result(system='Linux', node='igor-Latitude-5591', release='5.4.0-120-generic', version='#136-Ubuntu SMP Fri Jun 10 13:40:48 UTC 2022', machine='x86_64', processor='x86_64')  Threads 6\n",
      "Python 3.6.8 |Anaconda, Inc.| (default, Dec 30 2018, 01:22:34) \n",
      "[GCC 7.3.0]\n",
      "numpy 1.16.4  scipy 1.2.1\n",
      "Date: Wed Jun 22 21:37:21 2022\n",
      "PySCF version 2.0.1\n",
      "PySCF path  /home/igor/Data/opt/anaconda3/lib/python3.6/site-packages/pyscf\n",
      "\n",
      "[CONFIG] conf_file None\n",
      "[INPUT] verbose = 4\n",
      "[INPUT] num. atoms = 4\n",
      "[INPUT] num. electrons = 9\n",
      "[INPUT] charge = 1\n",
      "[INPUT] spin (= nelec alpha-beta = 2S) = 1\n",
      "[INPUT] symmetry False subgroup None\n",
      "[INPUT] Mole.unit = angstrom\n",
      "[INPUT]  1 N     -2.198839101900   1.897374626800   0.000000000000 AA   -4.155203694576   3.585518400351   0.000000000000 Bohr\n",
      "[INPUT]  2 H     -1.178839101900   1.897374626800   0.000000000000 AA   -2.227683047519   3.585518400351   0.000000000000 Bohr\n",
      "[INPUT]  3 H     -2.538835398700   1.092546014400  -0.526358644600 AA   -4.797703578894   2.064612745701  -0.994673681591 Bohr\n",
      "[INPUT]  4 H     -2.538840027600   2.755627174500  -0.433822469400 AA   -4.797712326247   5.207380661214  -0.819805653849 Bohr\n",
      "\n",
      "nuclear repulsion = 11.8479237868993\n",
      "number of shells = 86\n",
      "number of NR pGTOs = 393\n",
      "number of NR cGTOs = 367\n",
      "basis = aug-cc-pv5z\n",
      "ecp = {}\n",
      "CPU time:      1881.09\n",
      "\n",
      "\n",
      "******** <class 'pyscf.df.df_jk.density_fit.<locals>.DFHF'> ********\n",
      "method = DFHF-UHF\n",
      "initial guess = 1e\n",
      "damping factor = 0\n",
      "level_shift factor = 0\n",
      "DIIS = <class 'pyscf.scf.diis.CDIIS'>\n",
      "diis_start_cycle = 1\n",
      "diis_space = 8\n",
      "SCF conv_tol = 1e-09\n",
      "SCF conv_tol_grad = None\n",
      "SCF max_cycles = 50\n",
      "direct_scf = True\n",
      "direct_scf_tol = 1e-13\n",
      "chkfile to save SCF result = /home/igor/Documents/Package-Pool/Rust/rest/tmpl2046kom\n",
      "max_memory 4000 MB (current use 274 MB)\n",
      "number electrons alpha = 5  beta = 4\n",
      "Set gradient conv threshold to 3.16228e-05\n",
      "Initial guess from hcore.\n",
      "  alpha nocc = 5  HOMO = -7.55161757048187  LUMO = -4.62874347532264\n",
      "  beta  nocc = 4  HOMO = -7.70277054811847  LUMO = -7.55161757048187\n",
      "\n",
      "WARN: system HOMO -7.55161757048187 >= system LUMO -7.55161757048187\n",
      "\n",
      "******** <class 'pyscf.df.df.DF'> ********\n",
      "auxbasis = def2-tzvp-jkfit\n",
      "max_memory = 4000\n",
      "_cderi_to_save = /home/igor/Documents/Package-Pool/Rust/rest/tmplxl3q7w8\n",
      "init E= -43.8126334267145\n",
      "  alpha nocc = 5  HOMO = -0.115355264593377  LUMO = -0.0882788546282703\n",
      "  beta  nocc = 4  HOMO = -0.213120318354383  LUMO = -0.10569992248871\n",
      "cycle= 1 E= -50.5193288939156  delta_E= -6.71  |g|= 2.52  |ddm|= 6.85\n",
      "  alpha nocc = 5  HOMO = -2.15711755072672  LUMO = -0.957489463825055\n",
      "  beta  nocc = 4  HOMO = -2.30158014909455  LUMO = -2.14218920827088\n",
      "cycle= 2 E= -54.1182424905468  delta_E= -3.6  |g|= 2.36  |ddm|= 6.62\n",
      "  alpha nocc = 5  HOMO = -0.998937251703886  LUMO = -0.302063017563732\n",
      "  beta  nocc = 4  HOMO = -1.17000386480458  LUMO = -0.554573754128401\n",
      "cycle= 3 E= -55.8514956941578  delta_E= -1.73  |g|= 0.286  |ddm|= 0.737\n",
      "  alpha nocc = 5  HOMO = -0.973527447348521  LUMO = -0.156899232682598\n",
      "  beta  nocc = 4  HOMO = -1.03321980720044  LUMO = -0.289617180422221\n",
      "cycle= 4 E= -55.886601528976  delta_E= -0.0351  |g|= 0.0394  |ddm|= 0.13\n",
      "  alpha nocc = 5  HOMO = -0.959328779750887  LUMO = -0.151290779201814\n",
      "  beta  nocc = 4  HOMO = -1.01636332644765  LUMO = -0.27284986482392\n",
      "cycle= 5 E= -55.8875074038396  delta_E= -0.000906  |g|= 0.00793  |ddm|= 0.0325\n",
      "  alpha nocc = 5  HOMO = -0.960968371035728  LUMO = -0.151621725637642\n",
      "  beta  nocc = 4  HOMO = -1.01860434491281  LUMO = -0.274804830880197\n",
      "cycle= 6 E= -55.8875523387075  delta_E= -4.49e-05  |g|= 0.00248  |ddm|= 0.0058\n",
      "  alpha nocc = 5  HOMO = -0.961390775471065  LUMO = -0.151935112058894\n",
      "  beta  nocc = 4  HOMO = -1.01948340750642  LUMO = -0.275545578529168\n",
      "cycle= 7 E= -55.8875598226019  delta_E= -7.48e-06  |g|= 0.000952  |ddm|= 0.00235\n",
      "  alpha nocc = 5  HOMO = -0.961244889823427  LUMO = -0.151869139324705\n",
      "  beta  nocc = 4  HOMO = -1.01903989112098  LUMO = -0.275336886063311\n",
      "cycle= 8 E= -55.8875612640635  delta_E= -1.44e-06  |g|= 0.000248  |ddm|= 0.00123\n",
      "  alpha nocc = 5  HOMO = -0.961327683162851  LUMO = -0.151839113874229\n",
      "  beta  nocc = 4  HOMO = -1.01897099018521  LUMO = -0.275246310031765\n",
      "cycle= 9 E= -55.8875613685241  delta_E= -1.04e-07  |g|= 6.48e-05  |ddm|= 0.000405\n",
      "  alpha nocc = 5  HOMO = -0.961372117255483  LUMO = -0.151846837398921\n",
      "  beta  nocc = 4  HOMO = -1.01898616927568  LUMO = -0.275266185223572\n",
      "cycle= 10 E= -55.8875613723881  delta_E= -3.86e-09  |g|= 9.28e-06  |ddm|= 6.87e-05\n",
      "  alpha nocc = 5  HOMO = -0.961367764564808  LUMO = -0.151846815375284\n",
      "  beta  nocc = 4  HOMO = -1.01897960220057  LUMO = -0.275262279122424\n",
      "cycle= 11 E= -55.8875613724443  delta_E= -5.62e-11  |g|= 1.08e-06  |ddm|= 1.26e-05\n",
      "  alpha nocc = 5  HOMO = -0.961367946470558  LUMO = -0.151846827993217\n",
      "  beta  nocc = 4  HOMO = -1.01897975745585  LUMO = -0.275262422970059\n",
      "Extra cycle  E= -55.8875613724452  delta_E= -9.09e-13  |g|= 4.26e-07  |ddm|= 1.03e-06\n",
      "converged SCF energy = -55.8875613724452  <S^2> = 0.75833219  2S+1 = 2.0083149\n",
      "Total energy: -55.88756137244524\n",
      "Total job time:       7.44(wall)\n"
     ]
    }
   ],
   "source": [
    "lib.num_threads(6)\n",
    "TimeStart = time()\n",
    "mol = gto.Mole(                                                                                               \n",
    "        atom='''\n",
    "         N       -2.1988391019      1.8973746268      0.0000000000                 \n",
    "         H       -1.1788391019      1.8973746268      0.0000000000                 \n",
    "         H       -2.5388353987      1.0925460144     -0.5263586446                 \n",
    "         H       -2.5388400276      2.7556271745     -0.4338224694 ''',\n",
    "        charge=1,spin=1,basis='aug-cc-pv5z',verbose=4\n",
    "    ).build()\n",
    "mf = scf.UHF(mol).density_fit(auxbasis=\"def2-tzvp-jkfit\")\n",
    "mf.init_guess = '1e'\n",
    "mf.diis = 'diis'\n",
    "print(\"Total energy:\",mf.kernel())\n",
    "print(\"Total job time: %10.2f(wall)\" %(time()-TimeStart))\n",
    "##================================================\n",
    "## debug 3-center integrals\n",
    "##================================================\n",
    "#ri3fn = df.incore.aux_e2(mol,\"sto-3g\")\n",
    "# print(ri3fn.shape)\n",
    "# index = 0\n",
    "# for ind_k in range(0,ri3fn.shape[2]):\n",
    "#     for ind_j in range(0,ri3fn.shape[1]):\n",
    "#         for ind_i in range(0,ri3fn.shape[0]):\n",
    "#             x = ri3fn[ind_i][ind_j][ind_k]\n",
    "#             if abs(x)>0.1:\n",
    "#                 index += 1\n",
    "#                 print(\"I= %3i J=%3i K=%3i Int=%16.8f\" %(ind_i,ind_j,ind_k,x))\n",
    "# print(\"Print out %i 3-center RI-V tensor elements\" %index)\n",
    "##======================================================\n",
    "## for two-center auxiliary coulomb integrals\n",
    "##======================================================\n",
    "# ri3fn = df.incore.aux_e2(mol,\"def2-svp-jkfit\",intor='int3c2e_sph',aosym='s2ij')\n",
    "# auxmol=df.addons.make_auxmol(mol,'def2-svp-jkfit')\n",
    "# j2c=auxmol.intor('int2c2e',hermi=0)\n",
    "# # j2c = scipy.linalg.inv(j2c)\n",
    "# index = 0\n",
    "# for ind_j in range(0,j2c.shape[1]):\n",
    "#     for ind_i in range(0,j2c.shape[0]):\n",
    "#         x = j2c[ind_i][ind_j]\n",
    "#         if abs(x)>0.1:\n",
    "#             index += 1\n",
    "#             print(\"I= %3i J=%3i Int=%16.8f\" %(ind_i,ind_j,x))\n",
    "# print(\"Print out %i 2-center auxiliary coulomb elements\" %index)\n",
    "##======================================================\n",
    "## for three-center tensors\n",
    "##======================================================\n",
    "# ri3fn = lib.unpack_tril(mf.with_df._cderi)\n",
    "# index = 0\n",
    "# for ind_k in range(0,ri3fn.shape[0]):\n",
    "#     for ind_i in range(0,ri3fn.shape[1]):\n",
    "#         for ind_j in range(0,ri3fn.shape[2]):\n",
    "#             x = ri3fn[ind_k][ind_i][ind_j]\n",
    "#             if abs(x)>0.1:\n",
    "#                 index += 1\n",
    "#                 print(\"I= %3i J=%3i K=%3i Int=%16.8f\" %(ind_i,ind_j,ind_k,x))\n",
    "# print(\"Print out %i 3-center RI-V tensor elements\" %index)\n",
    "##======================================================\n",
    "## for ERI\n",
    "##======================================================\n",
    "# ri3fn = df.incore.aux_e2(mol,\"def2-svp-jkfit\",intor='int3c2e_sph',aosym='s2ij')\n",
    "# auxmol=df.addons.make_auxmol(mol,'def2-svp-jkfit')\n",
    "# j2c=auxmol.intor('int2c2e',hermi=0)\n",
    "# eri1 = numpy.einsum('ik,kl->il',ri3fn,numpy.linalg.inv(j2c))\n",
    "# eri1 = numpy.einsum('ip,kp->ik',eri1,ri3fn)\n",
    "# index = 0\n",
    "# for ind_ij in range(0,eri1.shape[0]):\n",
    "#     for ind_kl in range(0,eri1.shape[1]):\n",
    "#             x = eri1[ind_ij][ind_kl]\n",
    "#             if abs(x)>0.1:\n",
    "#                 index += 1\n",
    "#                 print(\"IJ= %3i KL=%3i Int=%16.8f\" %(ind_ij,ind_kl,x))\n",
    "# print(\"Print out %i 4-center ERI elements\" %index)\n",
    "\n",
    "# mf.kernel()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 105,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[ 7 20  1 23  0  0]\n",
      "[ 1 24  1 27  0  0]\n",
      "[ 1 28  1 31  0  0]\n",
      "[ 1 32  1 35  0  0]\n",
      "0 [ 0  0  3  1  0 42 45  0]\n",
      "[99.106169  18.052312   4.8856602]\n",
      "[12.24723354 11.84499063  3.69156624]\n",
      "1 [ 0  0  3  1  0 48 51  0]\n",
      "[3.7804559 0.8784966 0.2857144]\n",
      "[-0.68474806  0.91590581  0.69124784]\n",
      "2 [ 0  1  3  1  0 54 57  0]\n",
      "[3.7804559 0.8784966 0.2857144]\n",
      "[2.39776185 1.50777694 0.23885724]\n",
      "3 [ 1  0  3  1  0 36 39  0]\n",
      "[3.42525091 0.62391373 0.1688554 ]\n",
      "[0.98170675 0.94946401 0.29590645]\n",
      "4 [ 2  0  3  1  0 36 39  0]\n",
      "[3.42525091 0.62391373 0.1688554 ]\n",
      "[0.98170675 0.94946401 0.29590645]\n",
      "5 [ 3  0  3  1  0 36 39  0]\n",
      "[3.42525091 0.62391373 0.1688554 ]\n",
      "[0.98170675 0.94946401 0.29590645]\n",
      "debug\n",
      "[ 0.          0.          0.          0.          0.          0.\n",
      "  0.          0.          0.          0.          0.          0.\n",
      "  0.          0.          0.          0.          0.          0.\n",
      "  0.          0.         -4.15520369  3.5855184   0.          0.\n",
      " -2.22768305  3.5855184   0.          0.         -4.79770358  2.06461275\n",
      " -0.99467368  0.         -4.79771233  5.20738066 -0.81980565  0.\n",
      "  3.42525091  0.62391373  0.1688554   0.98170675  0.94946401  0.29590645\n",
      " 99.106169   18.052312    4.8856602  12.24723354 11.84499063  3.69156624\n",
      "  3.7804559   0.8784966   0.2857144  -0.68474806  0.91590581  0.69124784\n",
      "  3.7804559   0.8784966   0.2857144   2.39776185  1.50777694  0.23885724]\n"
     ]
    }
   ],
   "source": [
    "dd = df.addons.make_auxmol(mol,'sto-3g')\n",
    "\n",
    "for x in dd._atm:\n",
    "    print(x)\n",
    "index = 0\n",
    "for x in dd._bas:\n",
    "    print(index,x)\n",
    "    print(dd._env[x[5]:x[5]+x[2]])\n",
    "    print(dd._env[x[6]:x[6]+x[2]*x[3]])\n",
    "    index += 1\n",
    "print(\"debug\")\n",
    "print(dd._env)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "-55.45314190558954"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "mf.with_df.auxbasis = \"aug-cc-pvqz-jkfit\"\n",
    "mf.kernel() "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "-55.45314248764206"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "mf.with_df.auxbasis = df.aug_etb(mol, beta=1.7)\n",
    "mf.kernel() "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "-55.45144347014942"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "mf = scf.RHF(mol).density_fit(auxbasis=\"weigend\")\n",
    "mf.kernel()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 141,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "True\n",
      "True\n",
      "4.883871085326064e-13\n",
      "-2.7755575615628914e-15\n",
      "-1.10015376487841 -1.1001547208961515 -1.100193764624759 -1.1001937646247586\n"
     ]
    }
   ],
   "source": [
    "    from pyscf import scf\n",
    "    from pyscf import ao2mo\n",
    "    mol = gto.Mole()\n",
    "    mol.verbose = 0\n",
    "    mol.output = None\n",
    "\n",
    "    mol.atom.extend([\n",
    "        [\"H\", (0,  0, 0  )],\n",
    "        [\"H\", (0,  0, 1  )],\n",
    "    ])\n",
    "    mol.basis = 'cc-pvdz'\n",
    "    mol.build()\n",
    "\n",
    "    auxmol = df.incore.format_aux_basis(mol)\n",
    "    j3c = df.incore.aux_e2(mol, auxmol, intor='int3c2e_sph', aosym='s1')\n",
    "    nao = mol.nao_nr()\n",
    "    naoaux = auxmol.nao_nr()\n",
    "    j3c = j3c.reshape(nao,nao,naoaux)\n",
    "\n",
    "    atm, bas, env = \\\n",
    "            gto.mole.conc_env(mol._atm, mol._bas, mol._env,\n",
    "                              auxmol._atm, auxmol._bas, auxmol._env)\n",
    "    eri0 = numpy.empty((nao,nao,naoaux))\n",
    "    pi = 0\n",
    "    for i in range(mol.nbas):\n",
    "        pj = 0\n",
    "        for j in range(mol.nbas):\n",
    "            pk = 0\n",
    "            for k in range(mol.nbas, mol.nbas+auxmol.nbas):\n",
    "                shls = (i, j, k)\n",
    "                buf = gto.moleintor.getints_by_shell('int3c2e_sph',\n",
    "                                                     shls, atm, bas, env)\n",
    "                di, dj, dk = buf.shape\n",
    "                eri0[pi:pi+di,pj:pj+dj,pk:pk+dk] = buf\n",
    "                pk += dk\n",
    "            pj += dj\n",
    "        pi += di\n",
    "    print(numpy.allclose(eri0, j3c))\n",
    "\n",
    "    j2c = df.incore.fill_2c2e(mol, auxmol)\n",
    "    eri0 = numpy.empty_like(j2c)\n",
    "    pi = 0\n",
    "    for i in range(mol.nbas, len(bas)):\n",
    "        pj = 0\n",
    "        for j in range(mol.nbas, len(bas)):\n",
    "            shls = (i, j)\n",
    "            buf = gto.moleintor.getints_by_shell('int2c2e_sph',\n",
    "                                                 shls, atm, bas, env)\n",
    "            di, dj = buf.shape\n",
    "            eri0[pi:pi+di,pj:pj+dj] = buf\n",
    "            pj += dj\n",
    "        pi += di\n",
    "    print(numpy.allclose(eri0, j2c))\n",
    "\n",
    "    j3c = df.incore.aux_e2(mol, auxmol, intor='int3c2e_sph', aosym='s2ij')\n",
    "    cderi = df.incore.cholesky_eri(mol, auxmol=auxmol)\n",
    "    eri0 = numpy.einsum('pi,pk->ik', cderi, cderi)\n",
    "    eri1 = numpy.einsum('ik,kl->il', j3c, numpy.linalg.inv(j2c))\n",
    "    eri1 = numpy.einsum('ip,kp->ik', eri1, j3c)\n",
    "    print(abs(eri1 - eri0).max())\n",
    "    eri0 = ao2mo.restore(1, eri0, nao)\n",
    "\n",
    "    mf = scf.RHF(mol)\n",
    "    ehf0 = mf.scf()\n",
    "\n",
    "    nao = mf.mo_energy.size\n",
    "    eri1 = ao2mo.restore(1, mf._eri, nao)\n",
    "    print(abs(eri1-eri0).max() - 0.0022142583265513105)\n",
    "\n",
    "    mf._eri = ao2mo.restore(8, eri0, nao)\n",
    "    ehf1 = mf.scf()\n",
    "\n",
    "    mf = scf.RHF(mol).density_fit(auxbasis='weigend')\n",
    "    ehf2 = mf.scf()\n",
    "\n",
    "    mf = mf.density_fit(auxbasis='weigend')\n",
    "    ehf3 = mf.scf()\n",
    "    print(ehf0, ehf1, ehf2, ehf3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 54,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Help on class Mole in module pyscf.gto.mole:\n",
      "\n",
      "class Mole(pyscf.lib.misc.StreamObject)\n",
      " |  Basic class to hold molecular structure and global options\n",
      " |  \n",
      " |  Attributes:\n",
      " |      verbose : int\n",
      " |          Print level\n",
      " |      output : str or None\n",
      " |          Output file, default is None which dumps msg to sys.stdout\n",
      " |      max_memory : int, float\n",
      " |          Allowed memory in MB\n",
      " |      charge : int\n",
      " |          Charge of molecule. It affects the electron numbers\n",
      " |      spin : int or None\n",
      " |          2S, num. alpha electrons - num. beta electrons to control\n",
      " |          multiplicity. If spin = None is set, multiplicity will be guessed\n",
      " |          based on the neutral molecule.\n",
      " |      symmetry : bool or str\n",
      " |          Whether to use symmetry.  When this variable is set to True, the\n",
      " |          molecule will be rotated and the highest rotation axis will be\n",
      " |          placed z-axis.\n",
      " |          If a string is given as the name of point group, the given point\n",
      " |          group symmetry will be used.  Note that the input molecular\n",
      " |          coordinates will not be changed in this case.\n",
      " |      symmetry_subgroup : str\n",
      " |          subgroup\n",
      " |  \n",
      " |      atom : list or str\n",
      " |          To define molecluar structure.  The internal format is\n",
      " |  \n",
      " |          | atom = [[atom1, (x, y, z)],\n",
      " |          |         [atom2, (x, y, z)],\n",
      " |          |         ...\n",
      " |          |         [atomN, (x, y, z)]]\n",
      " |  \n",
      " |      unit : str\n",
      " |          Angstrom or Bohr\n",
      " |      basis : dict or str\n",
      " |          To define basis set.\n",
      " |      nucmod : dict or str or [function(nuc_charge, nucprop) => zeta]\n",
      " |          Nuclear model.  0 or None means point nuclear model.  Other\n",
      " |          values will enable Gaussian nuclear model.  If a function is\n",
      " |          assigned to this attribute, the function will be called to\n",
      " |          generate the nuclear charge distribution value \"zeta\" and the\n",
      " |          relevant nuclear model will be set to Gaussian model.\n",
      " |          Default is point nuclear model.\n",
      " |      nucprop : dict\n",
      " |          Nuclear properties (like g-factor 'g', quadrupole moments 'Q').\n",
      " |          It is needed by pyscf.prop module and submodules.\n",
      " |      cart : boolean\n",
      " |          Using Cartesian GTO basis and integrals (6d,10f,15g)\n",
      " |  \n",
      " |      ** Following attributes are generated by :func:`Mole.build` **\n",
      " |  \n",
      " |      stdout : file object\n",
      " |          Default is sys.stdout if :attr:`Mole.output` is not set\n",
      " |      topgroup : str\n",
      " |          Point group of the system.\n",
      " |      groupname : str\n",
      " |          The supported subgroup of the point group. It can be one of SO3,\n",
      " |          Dooh, Coov, D2h, C2h, C2v, D2, Cs, Ci, C2, C1\n",
      " |      nelectron : int\n",
      " |          sum of nuclear charges - :attr:`Mole.charge`\n",
      " |      symm_orb : a list of numpy.ndarray\n",
      " |          Symmetry adapted basis.  Each element is a set of symm-adapted orbitals\n",
      " |          for one irreducible representation.  The list index does **not** correspond\n",
      " |          to the id of irreducible representation.\n",
      " |      irrep_id : a list of int\n",
      " |          Each element is one irreducible representation id associated with the basis\n",
      " |          stored in symm_orb.  One irrep id stands for one irreducible representation\n",
      " |          symbol.  The irrep symbol and the relevant id are defined in\n",
      " |          :attr:`symm.param.IRREP_ID_TABLE`\n",
      " |      irrep_name : a list of str\n",
      " |          Each element is one irreducible representation symbol associated with the basis\n",
      " |          stored in symm_orb.  The irrep symbols are defined in\n",
      " |          :attr:`symm.param.IRREP_ID_TABLE`\n",
      " |      _built : bool\n",
      " |          To label whether :func:`Mole.build` has been called.  It is to\n",
      " |          ensure certain functions being initialized only once.\n",
      " |      _basis : dict\n",
      " |          like :attr:`Mole.basis`, the internal format which is returned from the\n",
      " |          parser :func:`format_basis`\n",
      " |      _keys : a set of str\n",
      " |          Store the keys appeared in the module.  It is used to check misinput attributes\n",
      " |  \n",
      " |      ** Following attributes are arguments used by ``libcint`` library **\n",
      " |  \n",
      " |      _atm :\n",
      " |          :code:`[[charge, ptr-of-coord, nuc-model, ptr-zeta, 0, 0], [...]]`\n",
      " |          each element reperesents one atom\n",
      " |      natm :\n",
      " |          number of atoms\n",
      " |      _bas :\n",
      " |          :code:`[[atom-id, angular-momentum, num-primitive-GTO, num-contracted-GTO, 0, ptr-of-exps, ptr-of-contract-coeff, 0], [...]]`\n",
      " |          each element reperesents one shell\n",
      " |      nbas :\n",
      " |          number of shells\n",
      " |      _env :\n",
      " |          list of floats to store the coordinates, GTO exponents, contract-coefficients\n",
      " |  \n",
      " |  Examples:\n",
      " |  \n",
      " |  >>> mol = Mole(atom='H^2 0 0 0; H 0 0 1.1', basis='sto3g').build()\n",
      " |  >>> print(mol.atom_symbol(0))\n",
      " |  H^2\n",
      " |  >>> print(mol.atom_pure_symbol(0))\n",
      " |  H\n",
      " |  >>> print(mol.nao_nr())\n",
      " |  2\n",
      " |  >>> print(mol.intor('int1e_ovlp_sph'))\n",
      " |  [[ 0.99999999  0.43958641]\n",
      " |   [ 0.43958641  0.99999999]]\n",
      " |  >>> mol.charge = 1\n",
      " |  >>> mol.build()\n",
      " |  <class 'pyscf.gto.mole.Mole'> has no attributes Charge\n",
      " |  \n",
      " |  Method resolution order:\n",
      " |      Mole\n",
      " |      pyscf.lib.misc.StreamObject\n",
      " |      builtins.object\n",
      " |  \n",
      " |  Methods defined here:\n",
      " |  \n",
      " |  __add__ = conc_mol(mol1, mol2)\n",
      " |      Concatenate two Mole objects.\n",
      " |  \n",
      " |  __getattr__(self, key)\n",
      " |      To support accessing methods (mol.HF, mol.KS, mol.CCSD, mol.CASSCF, ...)\n",
      " |      from Mole object.\n",
      " |  \n",
      " |  __init__(self, **kwargs)\n",
      " |      Initialize self.  See help(type(self)) for accurate signature.\n",
      " |  \n",
      " |  ao2mo(self, mo_coeffs, erifile=None, dataname='eri_mo', intor='int2e', **kwargs)\n",
      " |      Integral transformation for arbitrary orbitals and arbitrary\n",
      " |      integrals.  See more detalied documentation in func:`ao2mo.kernel`.\n",
      " |      \n",
      " |      Args:\n",
      " |          mo_coeffs (an np array or a list of arrays) : A matrix of orbital\n",
      " |              coefficients if it is a numpy ndarray, or four sets of orbital\n",
      " |              coefficients, corresponding to the four indices of (ij|kl).\n",
      " |      \n",
      " |      Kwargs:\n",
      " |          erifile (str or h5py File or h5py Group object) : The file/object\n",
      " |              to store the transformed integrals.  If not given, the return\n",
      " |              value is an array (in memory) of the transformed integrals.\n",
      " |          dataname : str\n",
      " |              *Note* this argument is effective if erifile is given.\n",
      " |              The dataset name in the erifile (ref the hierarchy of HDF5 format\n",
      " |              http://www.hdfgroup.org/HDF5/doc1.6/UG/09_Groups.html).  By assigning\n",
      " |              different dataname, the existed integral file can be reused.  If\n",
      " |              the erifile contains the specified dataname, the old integrals\n",
      " |              will be replaced by the new one under the key dataname.\n",
      " |          intor (str) : integral name Name of the 2-electron integral.  Ref\n",
      " |              to :func:`getints_by_shell`\n",
      " |              for the complete list of available 2-electron integral names\n",
      " |      \n",
      " |      Returns:\n",
      " |          An array of transformed integrals if erifile is not given.\n",
      " |          Otherwise, return the file/fileobject if erifile is assigned.\n",
      " |      \n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      >>> import pyscf\n",
      " |      >>> mol = pyscf.M(atom='O 0 0 0; H 0 1 0; H 0 0 1', basis='sto3g')\n",
      " |      >>> mo1 = numpy.random.random((mol.nao_nr(), 10))\n",
      " |      >>> mo2 = numpy.random.random((mol.nao_nr(), 8))\n",
      " |      \n",
      " |      >>> eri1 = mol.ao2mo(mo1)\n",
      " |      >>> print(eri1.shape)\n",
      " |      (55, 55)\n",
      " |      \n",
      " |      >>> eri1 = mol.ao2mo(mo1, compact=False)\n",
      " |      >>> print(eri1.shape)\n",
      " |      (100, 100)\n",
      " |      \n",
      " |      >>> eri1 = mol.ao2mo(eri, (mo1,mo2,mo2,mo2))\n",
      " |      >>> print(eri1.shape)\n",
      " |      (80, 36)\n",
      " |      \n",
      " |      >>> eri1 = mol.ao2mo(eri, (mo1,mo2,mo2,mo2), erifile='water.h5')\n",
      " |  \n",
      " |  ao_labels(mol, fmt=True, base=0)\n",
      " |      Labels of AO basis functions\n",
      " |      \n",
      " |      Kwargs:\n",
      " |          fmt : str or bool\n",
      " |              if fmt is boolean, it controls whether to format the labels and the\n",
      " |              default format is \"%d%3s %s%-4s\".  if fmt is string, the string will\n",
      " |              be used as the print format.\n",
      " |      \n",
      " |      Returns:\n",
      " |          List of [(atom-id, symbol-str, nl-str, str-of-AO-notation)]\n",
      " |          or formatted strings based on the argument \"fmt\"\n",
      " |  \n",
      " |  ao_loc_2c(mol)\n",
      " |      Offset of every shell in the spinor basis function spectrum\n",
      " |      \n",
      " |      Returns:\n",
      " |          list, each entry is the corresponding start id of spinor function\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      >>> mol = gto.M(atom='O 0 0 0; C 0 0 1', basis='6-31g')\n",
      " |      >>> gto.ao_loc_2c(mol)\n",
      " |      [0, 2, 4, 6, 12, 18, 20, 22, 24, 30, 36]\n",
      " |  \n",
      " |  ao_loc_nr(mol, cart=None)\n",
      " |      Offset of every shell in the spherical basis function spectrum\n",
      " |      \n",
      " |      Returns:\n",
      " |          list, each entry is the corresponding start basis function id\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      >>> mol = gto.M(atom='O 0 0 0; C 0 0 1', basis='6-31g')\n",
      " |      >>> gto.ao_loc_nr(mol)\n",
      " |      [0, 1, 2, 3, 6, 9, 10, 11, 12, 15, 18]\n",
      " |  \n",
      " |  aoslice_2c_by_atom = offset_2c_by_atom(mol)\n",
      " |  \n",
      " |  aoslice_by_atom(mol, ao_loc=None)\n",
      " |      AO offsets for each atom.  Return a list, each item of the list gives\n",
      " |      (start-shell-id, stop-shell-id, start-AO-id, stop-AO-id)\n",
      " |  \n",
      " |  aoslice_nr_by_atom = aoslice_by_atom(mol, ao_loc=None)\n",
      " |  \n",
      " |  apply(self, fn, *args, **kwargs)\n",
      " |      Apply the fn to rest arguments:  return fn(*args, **kwargs).  The\n",
      " |      return value of method set is the object itself.  This allows a series\n",
      " |      of functions/methods to be executed in pipe.\n",
      " |  \n",
      " |  atom_charge(self, atm_id)\n",
      " |      Nuclear effective charge of the given atom id\n",
      " |      Note \"atom_charge /= charge(atom_symbol)\" when ECP is enabled.\n",
      " |      Number of electrons screened by ECP can be obtained by charge(atom_symbol)-atom_charge\n",
      " |      \n",
      " |      Args:\n",
      " |          atm_id : int\n",
      " |              0-based\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      >>> mol.build(atom='H 0 0 0; Cl 0 0 1.1')\n",
      " |      >>> mol.atom_charge(1)\n",
      " |      17\n",
      " |  \n",
      " |  atom_charges(self)\n",
      " |      np.asarray([mol.atom_charge(i) for i in range(mol.natm)])\n",
      " |  \n",
      " |  atom_coord(self, atm_id, unit='Bohr')\n",
      " |      Coordinates (ndarray) of the given atom id\n",
      " |      \n",
      " |      Args:\n",
      " |          atm_id : int\n",
      " |              0-based\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      >>> mol.build(atom='H 0 0 0; Cl 0 0 1.1')\n",
      " |      >>> mol.atom_coord(1)\n",
      " |      [ 0.          0.          2.07869874]\n",
      " |  \n",
      " |  atom_coords(self, unit='Bohr')\n",
      " |      np.asarray([mol.atom_coords(i) for i in range(mol.natm)])\n",
      " |  \n",
      " |  atom_mass_list(mol, isotope_avg=False)\n",
      " |      A list of mass for all atoms in the molecule\n",
      " |      \n",
      " |      Kwargs:\n",
      " |          isotope_avg : boolean\n",
      " |              Whether to use the isotope average mass as the atomic mass\n",
      " |  \n",
      " |  atom_nelec_core(self, atm_id)\n",
      " |      Number of core electrons for pseudo potential.\n",
      " |  \n",
      " |  atom_nshells(self, atm_id)\n",
      " |      Number of basis/shells of the given atom\n",
      " |      \n",
      " |      Args:\n",
      " |          atm_id : int\n",
      " |              0-based\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      >>> mol.build(atom='H 0 0 0; Cl 0 0 1.1')\n",
      " |      >>> mol.atom_nshells(1)\n",
      " |      5\n",
      " |  \n",
      " |  atom_pure_symbol(self, atm_id)\n",
      " |      For the given atom id, return the standard symbol (striping special characters)\n",
      " |      \n",
      " |      Args:\n",
      " |          atm_id : int\n",
      " |              0-based\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      >>> mol.build(atom='H^2 0 0 0; H 0 0 1.1')\n",
      " |      >>> mol.atom_symbol(0)\n",
      " |      H\n",
      " |  \n",
      " |  atom_shell_ids(self, atm_id)\n",
      " |      A list of the shell-ids of the given atom\n",
      " |      \n",
      " |      Args:\n",
      " |          atm_id : int\n",
      " |              0-based\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      >>> mol.build(atom='H 0 0 0; Cl 0 0 1.1', basis='cc-pvdz')\n",
      " |      >>> mol.atom_shell_ids(1)\n",
      " |      [3, 4, 5, 6, 7]\n",
      " |  \n",
      " |  atom_symbol(self, atm_id)\n",
      " |      For the given atom id, return the input symbol (without striping special characters)\n",
      " |      \n",
      " |      Args:\n",
      " |          atm_id : int\n",
      " |              0-based\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      >>> mol.build(atom='H^2 0 0 0; H 0 0 1.1')\n",
      " |      >>> mol.atom_symbol(0)\n",
      " |      H^2\n",
      " |  \n",
      " |  bas_angular(self, bas_id)\n",
      " |      The angular momentum associated with the given basis\n",
      " |      \n",
      " |      Args:\n",
      " |          bas_id : int\n",
      " |              0-based\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      >>> mol.build(atom='H 0 0 0; Cl 0 0 1.1', basis='cc-pvdz')\n",
      " |      >>> mol.bas_atom(7)\n",
      " |      2\n",
      " |  \n",
      " |  bas_atom(self, bas_id)\n",
      " |      The atom (0-based id) that the given basis sits on\n",
      " |      \n",
      " |      Args:\n",
      " |          bas_id : int\n",
      " |              0-based\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      >>> mol.build(atom='H 0 0 0; Cl 0 0 1.1', basis='cc-pvdz')\n",
      " |      >>> mol.bas_atom(7)\n",
      " |      1\n",
      " |  \n",
      " |  bas_coord(self, bas_id)\n",
      " |      Coordinates (ndarray) associated with the given basis id\n",
      " |      \n",
      " |      Args:\n",
      " |          bas_id : int\n",
      " |              0-based\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      >>> mol.build(atom='H 0 0 0; Cl 0 0 1.1')\n",
      " |      >>> mol.bas_coord(1)\n",
      " |      [ 0.          0.          2.07869874]\n",
      " |  \n",
      " |  bas_ctr_coeff(self, bas_id)\n",
      " |      Contract coefficients (ndarray) of the given shell\n",
      " |      \n",
      " |      Args:\n",
      " |          bas_id : int\n",
      " |              0-based\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      >>> mol.M(atom='H 0 0 0; Cl 0 0 1.1', basis='cc-pvdz')\n",
      " |      >>> mol.bas_ctr_coeff(0)\n",
      " |      [[ 10.03400444]\n",
      " |       [  4.1188704 ]\n",
      " |       [  1.53971186]]\n",
      " |  \n",
      " |  bas_exp(self, bas_id)\n",
      " |      exponents (ndarray) of the given shell\n",
      " |      \n",
      " |      Args:\n",
      " |          bas_id : int\n",
      " |              0-based\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      >>> mol.build(atom='H 0 0 0; Cl 0 0 1.1', basis='cc-pvdz')\n",
      " |      >>> mol.bas_kappa(0)\n",
      " |      [ 13.01     1.962    0.4446]\n",
      " |  \n",
      " |  bas_kappa(self, bas_id)\n",
      " |      Kappa (if l < j, -l-1, else l) of the given shell\n",
      " |      \n",
      " |      Args:\n",
      " |          bas_id : int\n",
      " |              0-based\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      >>> mol.build(atom='H 0 0 0; Cl 0 0 1.1', basis='cc-pvdz')\n",
      " |      >>> mol.bas_kappa(3)\n",
      " |      0\n",
      " |  \n",
      " |  bas_len_cart(self, bas_id)\n",
      " |      The number of Cartesian function associated with given basis\n",
      " |  \n",
      " |  bas_len_spinor(self, bas_id)\n",
      " |      The number of spinor associated with given basis\n",
      " |      If kappa is 0, return 4l+2\n",
      " |  \n",
      " |  bas_nctr(self, bas_id)\n",
      " |      The number of contracted GTOs for the given shell\n",
      " |      \n",
      " |      Args:\n",
      " |          bas_id : int\n",
      " |              0-based\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      >>> mol.build(atom='H 0 0 0; Cl 0 0 1.1', basis='cc-pvdz')\n",
      " |      >>> mol.bas_atom(3)\n",
      " |      3\n",
      " |  \n",
      " |  bas_nprim(self, bas_id)\n",
      " |      The number of primitive GTOs for the given shell\n",
      " |      \n",
      " |      Args:\n",
      " |          bas_id : int\n",
      " |              0-based\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      >>> mol.build(atom='H 0 0 0; Cl 0 0 1.1', basis='cc-pvdz')\n",
      " |      >>> mol.bas_atom(3)\n",
      " |      11\n",
      " |  \n",
      " |  build(self, dump_input=True, parse_arg=True, verbose=None, output=None, max_memory=None, atom=None, basis=None, unit=None, nucmod=None, ecp=None, charge=None, spin=0, symmetry=None, symmetry_subgroup=None, cart=None)\n",
      " |      Setup moleclue and initialize some control parameters.  Whenever you\n",
      " |      change the value of the attributes of :class:`Mole`, you need call\n",
      " |      this function to refresh the internal data of Mole.\n",
      " |      \n",
      " |      Kwargs:\n",
      " |          dump_input : bool\n",
      " |              whether to dump the contents of input file in the output file\n",
      " |          parse_arg : bool\n",
      " |              whether to read the sys.argv and overwrite the relevant parameters\n",
      " |          verbose : int\n",
      " |              Print level.  If given, overwrite :attr:`Mole.verbose`\n",
      " |          output : str or None\n",
      " |              Output file.  If given, overwrite :attr:`Mole.output`\n",
      " |          max_memory : int, float\n",
      " |              Allowd memory in MB.  If given, overwrite :attr:`Mole.max_memory`\n",
      " |          atom : list or str\n",
      " |              To define molecluar structure.\n",
      " |          basis : dict or str\n",
      " |              To define basis set.\n",
      " |          nucmod : dict or str\n",
      " |              Nuclear model.  If given, overwrite :attr:`Mole.nucmod`\n",
      " |          charge : int\n",
      " |              Charge of molecule. It affects the electron numbers\n",
      " |              If given, overwrite :attr:`Mole.charge`\n",
      " |          spin : int\n",
      " |              2S, num. alpha electrons - num. beta electrons to control\n",
      " |              multiplicity. If setting spin = None , multiplicity will be\n",
      " |              guessed based on the neutral molecule.\n",
      " |              If given, overwrite :attr:`Mole.spin`\n",
      " |          symmetry : bool or str\n",
      " |              Whether to use symmetry.  If given a string of point group\n",
      " |              name, the given point group symmetry will be used.\n",
      " |  \n",
      " |  cart2sph_coeff(self, normalized='sp')\n",
      " |      Transformation matrix that transforms Cartesian GTOs to spherical\n",
      " |      GTOs for all basis functions\n",
      " |      \n",
      " |      Kwargs:\n",
      " |          normalized : string or boolean\n",
      " |              How the Cartesian GTOs are normalized.  Except s and p functions,\n",
      " |              Cartesian GTOs do not have the universal normalization coefficients\n",
      " |              for the different components of the same shell.  The value of this\n",
      " |              argument can be one of 'sp', 'all', None.  'sp' means the Cartesian s\n",
      " |              and p basis are normalized.  'all' means all Cartesian functions are\n",
      " |              normalized.  None means none of the Cartesian functions are normalized.\n",
      " |              The default value 'sp' is the convention used by libcint library.\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      >>> mol = gto.M(atom='H 0 0 0; F 0 0 1', basis='ccpvtz')\n",
      " |      >>> c = mol.cart2sph_coeff()\n",
      " |      >>> s0 = mol.intor('int1e_ovlp_sph')\n",
      " |      >>> s1 = c.T.dot(mol.intor('int1e_ovlp_cart')).dot(c)\n",
      " |      >>> print(abs(s1-s0).sum())\n",
      " |      >>> 4.58676826646e-15\n",
      " |  \n",
      " |  cart_labels(mol, fmt=True, base=0)\n",
      " |      Labels of Cartesian GTO functions\n",
      " |      \n",
      " |      Kwargs:\n",
      " |          fmt : str or bool\n",
      " |          if fmt is boolean, it controls whether to format the labels and the\n",
      " |          default format is \"%d%3s %s%-4s\".  if fmt is string, the string will\n",
      " |          be used as the print format.\n",
      " |      \n",
      " |      Returns:\n",
      " |          List of [(atom-id, symbol-str, nl-str, str-of-xyz-notation)]\n",
      " |          or formatted strings based on the argument \"fmt\"\n",
      " |  \n",
      " |  condense_to_shell(mol, mat, compressor='max')\n",
      " |      The given matrix is first partitioned to blocks, based on AO shell as\n",
      " |      delimiter. Then call compressor function to abstract each block.\n",
      " |  \n",
      " |  copy(mol)\n",
      " |      Deepcopy of the given :class:`Mole` object\n",
      " |  \n",
      " |  dump_input(self)\n",
      " |  \n",
      " |  dumps(mol)\n",
      " |      Serialize Mole object to a JSON formatted str.\n",
      " |  \n",
      " |  energy_nuc(mol, charges=None, coords=None)\n",
      " |      Compute nuclear repulsion energy (AU) or static Coulomb energy\n",
      " |      \n",
      " |      Returns\n",
      " |          float\n",
      " |  \n",
      " |  etbs = expand_etbs(self, etbs)\n",
      " |  \n",
      " |  eval_ao = eval_gto(mol, eval_name, coords, comp=None, shls_slice=None, non0tab=None, ao_loc=None, out=None)\n",
      " |  \n",
      " |  eval_gto(mol, eval_name, coords, comp=None, shls_slice=None, non0tab=None, ao_loc=None, out=None)\n",
      " |      Evaluate AO function value on the given grids,\n",
      " |      \n",
      " |      Args:\n",
      " |          eval_name : str\n",
      " |      \n",
      " |              ========================  ======  =======================\n",
      " |              Function                  comp    Expression\n",
      " |              ========================  ======  =======================\n",
      " |              \"GTOval_sph\"              1       |AO>\n",
      " |              \"GTOval_ip_sph\"           3       nabla |AO>\n",
      " |              \"GTOval_ig_sph\"           3       (#C(0 1) g) |AO>\n",
      " |              \"GTOval_ipig_sph\"         9       (#C(0 1) nabla g) |AO>\n",
      " |              \"GTOval_cart\"             1       |AO>\n",
      " |              \"GTOval_ip_cart\"          3       nabla |AO>\n",
      " |              \"GTOval_ig_cart\"          3       (#C(0 1) g)|AO>\n",
      " |              \"GTOval_sph_deriv1\"       4       GTO value and 1st order GTO values\n",
      " |              \"GTOval_sph_deriv2\"       10      All derivatives up to 2nd order\n",
      " |              \"GTOval_sph_deriv3\"       20      All derivatives up to 3rd order\n",
      " |              \"GTOval_sph_deriv4\"       35      All derivatives up to 4th order\n",
      " |              \"GTOval_sp_spinor\"        1       sigma dot p |AO> (spinor basis)\n",
      " |              \"GTOval_ipsp_spinor\"      3       nabla sigma dot p |AO> (spinor basis)\n",
      " |              \"GTOval_ipipsp_spinor\"    9       nabla nabla sigma dot p |AO> (spinor basis)\n",
      " |              ========================  ======  =======================\n",
      " |      \n",
      " |          atm : int32 ndarray\n",
      " |              libcint integral function argument\n",
      " |          bas : int32 ndarray\n",
      " |              libcint integral function argument\n",
      " |          env : float64 ndarray\n",
      " |              libcint integral function argument\n",
      " |      \n",
      " |          coords : 2D array, shape (N,3)\n",
      " |              The coordinates of the grids.\n",
      " |      \n",
      " |      Kwargs:\n",
      " |          comp : int\n",
      " |              Number of the components of the operator\n",
      " |          shls_slice : 2-element list\n",
      " |              (shl_start, shl_end).\n",
      " |              If given, only part of AOs (shl_start <= shell_id < shl_end) are\n",
      " |              evaluated.  By default, all shells defined in mol will be evaluated.\n",
      " |          non0tab : 2D bool array\n",
      " |              mask array to indicate whether the AO values are zero.  The mask\n",
      " |              array can be obtained by calling :func:`dft.gen_grid.make_mask`\n",
      " |          out : ndarray\n",
      " |              If provided, results are written into this array.\n",
      " |      \n",
      " |      Returns:\n",
      " |          2D array of shape (N,nao) Or 3D array of shape (\\*,N,nao) to store AO\n",
      " |          values on grids.\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      >>> mol = gto.M(atom='O 0 0 0; H 0 0 1; H 0 1 0', basis='ccpvdz')\n",
      " |      >>> coords = numpy.random.random((100,3))  # 100 random points\n",
      " |      >>> ao_value = mol.eval_gto(\"GTOval_sph\", coords)\n",
      " |      >>> print(ao_value.shape)\n",
      " |      (100, 24)\n",
      " |      >>> ao_value = mol.eval_gto(\"GTOval_ig_sph\", coords)\n",
      " |      >>> print(ao_value.shape)\n",
      " |      (3, 100, 24)\n",
      " |  \n",
      " |  expand_etb(self, l, n, alpha, beta)\n",
      " |      Generate the exponents of even tempered basis for :attr:`Mole.basis`.\n",
      " |      .. math::\n",
      " |      \n",
      " |          e = e^{-\\alpha * \\beta^{i-1}} for i = 1 .. n\n",
      " |      \n",
      " |      Args:\n",
      " |          l : int\n",
      " |              Angular momentum\n",
      " |          n : int\n",
      " |              Number of GTOs\n",
      " |      \n",
      " |      Returns:\n",
      " |          Formated :attr:`~Mole.basis`\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      >>> gto.expand_etb(1, 3, 1.5, 2)\n",
      " |      [[1, [6.0, 1]], [1, [3.0, 1]], [1, [1.5, 1]]]\n",
      " |  \n",
      " |  expand_etbs(self, etbs)\n",
      " |      Generate even tempered basis.  See also :func:`expand_etb`\n",
      " |      \n",
      " |      Args:\n",
      " |          etbs = [(l, n, alpha, beta), (l, n, alpha, beta),...]\n",
      " |      \n",
      " |      Returns:\n",
      " |          Formated :attr:`~Mole.basis`\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      >>> gto.expand_etbs([(0, 2, 1.5, 2.), (1, 2, 1, 2.)])\n",
      " |      [[0, [6.0, 1]], [0, [3.0, 1]], [1, [1., 1]], [1, [2., 1]]]\n",
      " |  \n",
      " |  format_atom(self, atom, origin=0, axes=None, unit='Ang')\n",
      " |      Convert the input :attr:`Mole.atom` to the internal data format.\n",
      " |      Including, changing the nuclear charge to atom symbol, converting the\n",
      " |      coordinates to AU, rotate and shift the molecule.\n",
      " |      If the :attr:`~Mole.atom` is a string, it takes \";\" and \"\\n\"\n",
      " |      for the mark to separate atoms;  \",\" and arbitrary length of blank space\n",
      " |      to spearate the individual terms for an atom.  Blank line will be ignored.\n",
      " |      \n",
      " |      Args:\n",
      " |          atoms : list or str\n",
      " |              the same to :attr:`Mole.atom`\n",
      " |      \n",
      " |      Kwargs:\n",
      " |          origin : ndarray\n",
      " |              new axis origin.\n",
      " |          axes : ndarray\n",
      " |              (new_x, new_y, new_z), new coordinates\n",
      " |          unit : str or number\n",
      " |              If unit is one of strings (B, b, Bohr, bohr, AU, au), the coordinates\n",
      " |              of the input atoms are the atomic unit;  If unit is one of strings\n",
      " |              (A, a, Angstrom, angstrom, Ang, ang), the coordinates are in the\n",
      " |              unit of angstrom;  If a number is given, the number are considered\n",
      " |              as the Bohr value (in angstrom), which should be around 0.53.\n",
      " |              Set unit=1 if wishing to preserve the unit of the coordinates.\n",
      " |      \n",
      " |      Returns:\n",
      " |          \"atoms\" in the internal format. The internal format is\n",
      " |              | atom = [[atom1, (x, y, z)],\n",
      " |              |         [atom2, (x, y, z)],\n",
      " |              |         ...\n",
      " |              |         [atomN, (x, y, z)]]\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      >>> gto.format_atom('9,0,0,0; h@1 0 0 1', origin=(1,1,1))\n",
      " |      [['F', [-1.0, -1.0, -1.0]], ['H@1', [-1.0, -1.0, 0.0]]]\n",
      " |      >>> gto.format_atom(['9,0,0,0', (1, (0, 0, 1))], origin=(1,1,1))\n",
      " |      [['F', [-1.0, -1.0, -1.0]], ['H', [-1, -1, 0]]]\n",
      " |  \n",
      " |  format_basis(self, basis_tab)\n",
      " |      Convert the input :attr:`Mole.basis` to the internal data format.\n",
      " |      \n",
      " |      ``{ atom: [(l, ((-exp, c_1, c_2, ..),\n",
      " |                      (-exp, c_1, c_2, ..))),\n",
      " |                 (l, ((-exp, c_1, c_2, ..),\n",
      " |                      (-exp, c_1, c_2, ..)))], ... }``\n",
      " |      \n",
      " |      Args:\n",
      " |          basis_tab : dict\n",
      " |              Similar to :attr:`Mole.basis`, it **cannot** be a str\n",
      " |      \n",
      " |      Returns:\n",
      " |          Formated :attr:`~Mole.basis`\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      >>> gto.format_basis({'H':'sto-3g', 'H^2': '3-21g'})\n",
      " |      {'H': [[0,\n",
      " |          [3.4252509099999999, 0.15432897000000001],\n",
      " |          [0.62391373000000006, 0.53532813999999995],\n",
      " |          [0.16885539999999999, 0.44463454000000002]]],\n",
      " |       'H^2': [[0,\n",
      " |          [5.4471780000000001, 0.15628500000000001],\n",
      " |          [0.82454700000000003, 0.90469100000000002]],\n",
      " |          [0, [0.18319199999999999, 1.0]]]}\n",
      " |  \n",
      " |  format_ecp(self, ecp_tab)\n",
      " |      Convert the input :attr:`ecp` (dict) to the internal data format::\n",
      " |      \n",
      " |      { atom: (nelec,  # core electrons\n",
      " |               ((l,  # l=-1 for UL, l>=0 for Ul to indicate |l><l|\n",
      " |                 (((exp_1, c_1),  # for r^0\n",
      " |                   (exp_2, c_2),\n",
      " |                   ...),\n",
      " |                  ((exp_1, c_1),  # for r^1\n",
      " |                   (exp_2, c_2),\n",
      " |                   ...),\n",
      " |                  ((exp_1, c_1),  # for r^2\n",
      " |                   ...))))),\n",
      " |       ...}\n",
      " |  \n",
      " |  fromfile(self, filename, format=None)\n",
      " |      Update the Mole object based on the input geometry file\n",
      " |  \n",
      " |  fromstring(self, string, format='xyz')\n",
      " |      Update the Mole object based on the input geometry string\n",
      " |  \n",
      " |  get_enuc(self)\n",
      " |  \n",
      " |  gto_norm(self, l, expnt)\n",
      " |      Normalized factor for GTO radial part   :math:`g=r^l e^{-\\alpha r^2}`\n",
      " |      \n",
      " |      .. math::\n",
      " |      \n",
      " |          \\frac{1}{\\sqrt{\\int g^2 r^2 dr}}\n",
      " |          = \\sqrt{\\frac{2^{2l+3} (l+1)! (2a)^{l+1.5}}{(2l+2)!\\sqrt{\\pi}}}\n",
      " |      \n",
      " |      Ref: H. B. Schlegel and M. J. Frisch, Int. J. Quant.  Chem., 54(1995), 83-87.\n",
      " |      \n",
      " |      Args:\n",
      " |          l (int):\n",
      " |              angular momentum\n",
      " |          expnt :\n",
      " |              exponent :math:`\\alpha`\n",
      " |      \n",
      " |      Returns:\n",
      " |          normalization factor\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      >>> print(gto_norm(0, 1))\n",
      " |      2.5264751109842591\n",
      " |  \n",
      " |  has_ecp(self)\n",
      " |      Whether pseudo potential is used in the system.\n",
      " |  \n",
      " |  has_ecp_soc(self)\n",
      " |      Whether spin-orbit coupling is enabled in ECP.\n",
      " |  \n",
      " |  inertia_moment(mol, mass=None, coords=None)\n",
      " |  \n",
      " |  intor(self, intor, comp=None, hermi=0, aosym='s1', out=None, shls_slice=None, grids=None)\n",
      " |      Integral generator.\n",
      " |      \n",
      " |      Args:\n",
      " |          intor : str\n",
      " |              Name of the 1e or 2e AO integrals.  Ref to :func:`getints` for the\n",
      " |              complete list of available 1-electron integral names\n",
      " |      \n",
      " |      Kwargs:\n",
      " |          comp : int\n",
      " |              Components of the integrals, e.g. int1e_ipovlp_sph has 3 components.\n",
      " |          hermi : int\n",
      " |              Symmetry of the integrals\n",
      " |      \n",
      " |              | 0 : no symmetry assumed (default)\n",
      " |              | 1 : hermitian\n",
      " |              | 2 : anti-hermitian\n",
      " |      \n",
      " |          grids : ndarray\n",
      " |              Coordinates of grids for the int1e_grids integrals\n",
      " |      \n",
      " |      Returns:\n",
      " |          ndarray of 1-electron integrals, can be either 2-dim or 3-dim, depending on comp\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      >>> mol.build(atom='H 0 0 0; H 0 0 1.1', basis='sto-3g')\n",
      " |      >>> mol.intor('int1e_ipnuc_sph', comp=3) # <nabla i | V_nuc | j>\n",
      " |      [[[ 0.          0.        ]\n",
      " |        [ 0.          0.        ]]\n",
      " |       [[ 0.          0.        ]\n",
      " |        [ 0.          0.        ]]\n",
      " |       [[ 0.10289944  0.48176097]\n",
      " |        [-0.48176097 -0.10289944]]]\n",
      " |      >>> mol.intor('int1e_nuc_spinor')\n",
      " |      [[-1.69771092+0.j  0.00000000+0.j -0.67146312+0.j  0.00000000+0.j]\n",
      " |       [ 0.00000000+0.j -1.69771092+0.j  0.00000000+0.j -0.67146312+0.j]\n",
      " |       [-0.67146312+0.j  0.00000000+0.j -1.69771092+0.j  0.00000000+0.j]\n",
      " |       [ 0.00000000+0.j -0.67146312+0.j  0.00000000+0.j -1.69771092+0.j]]\n",
      " |  \n",
      " |  intor_asymmetric(self, intor, comp=None, grids=None)\n",
      " |      One-electron integral generator. The integrals are assumed to be anti-hermitian\n",
      " |      \n",
      " |      Args:\n",
      " |          intor : str\n",
      " |              Name of the 1-electron integral.  Ref to :func:`getints` for the\n",
      " |              complete list of available 1-electron integral names\n",
      " |      \n",
      " |      Kwargs:\n",
      " |          comp : int\n",
      " |              Components of the integrals, e.g. int1e_ipovlp has 3 components.\n",
      " |          grids : ndarray\n",
      " |              Coordinates of grids for the int1e_grids integrals\n",
      " |      \n",
      " |      Returns:\n",
      " |          ndarray of 1-electron integrals, can be either 2-dim or 3-dim, depending on comp\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      >>> mol.build(atom='H 0 0 0; H 0 0 1.1', basis='sto-3g')\n",
      " |      >>> mol.intor_asymmetric('int1e_nuc_spinor')\n",
      " |      [[-1.69771092+0.j  0.00000000+0.j  0.67146312+0.j  0.00000000+0.j]\n",
      " |       [ 0.00000000+0.j -1.69771092+0.j  0.00000000+0.j  0.67146312+0.j]\n",
      " |       [-0.67146312+0.j  0.00000000+0.j -1.69771092+0.j  0.00000000+0.j]\n",
      " |       [ 0.00000000+0.j -0.67146312+0.j  0.00000000+0.j -1.69771092+0.j]]\n",
      " |  \n",
      " |  intor_by_shell(self, intor, shells, comp=None, grids=None)\n",
      " |      For given 2, 3 or 4 shells, interface for libcint to get 1e, 2e,\n",
      " |      2-center-2e or 3-center-2e integrals\n",
      " |      \n",
      " |      Args:\n",
      " |          intor_name : str\n",
      " |              See also :func:`getints` for the supported intor_name\n",
      " |          shls : list of int\n",
      " |              The AO shell-ids of the integrals\n",
      " |          atm : int32 ndarray\n",
      " |              libcint integral function argument\n",
      " |          bas : int32 ndarray\n",
      " |              libcint integral function argument\n",
      " |          env : float64 ndarray\n",
      " |              libcint integral function argument\n",
      " |      \n",
      " |      Kwargs:\n",
      " |          comp : int\n",
      " |              Components of the integrals, e.g. int1e_ipovlp has 3 components.\n",
      " |      \n",
      " |      Returns:\n",
      " |          ndarray of 2-dim to 5-dim, depending on the integral type (1e,\n",
      " |          2e, 3c-2e, 2c2e) and the value of comp\n",
      " |      \n",
      " |      Examples:\n",
      " |          The gradients of the spherical 2e integrals\n",
      " |      \n",
      " |      >>> mol.build(atom='H 0 0 0; H 0 0 1.1', basis='sto-3g')\n",
      " |      >>> gto.getints_by_shell('int2e_ip1_sph', (0,1,0,1), mol._atm, mol._bas, mol._env, comp=3)\n",
      " |      [[[[[-0.        ]]]]\n",
      " |        [[[[-0.        ]]]]\n",
      " |        [[[[-0.08760462]]]]]\n",
      " |  \n",
      " |  intor_symmetric(self, intor, comp=None, grids=None)\n",
      " |      One-electron integral generator. The integrals are assumed to be hermitian\n",
      " |      \n",
      " |      Args:\n",
      " |          intor : str\n",
      " |              Name of the 1-electron integral.  Ref to :func:`getints` for the\n",
      " |              complete list of available 1-electron integral names\n",
      " |      \n",
      " |      Kwargs:\n",
      " |          comp : int\n",
      " |              Components of the integrals, e.g. int1e_ipovlp_sph has 3 components.\n",
      " |          grids : ndarray\n",
      " |              Coordinates of grids for the int1e_grids integrals\n",
      " |      \n",
      " |      Returns:\n",
      " |          ndarray of 1-electron integrals, can be either 2-dim or 3-dim, depending on comp\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      >>> mol.build(atom='H 0 0 0; H 0 0 1.1', basis='sto-3g')\n",
      " |      >>> mol.intor_symmetric('int1e_nuc_spinor')\n",
      " |      [[-1.69771092+0.j  0.00000000+0.j -0.67146312+0.j  0.00000000+0.j]\n",
      " |       [ 0.00000000+0.j -1.69771092+0.j  0.00000000+0.j -0.67146312+0.j]\n",
      " |       [-0.67146312+0.j  0.00000000+0.j -1.69771092+0.j  0.00000000+0.j]\n",
      " |       [ 0.00000000+0.j -0.67146312+0.j  0.00000000+0.j -1.69771092+0.j]]\n",
      " |  \n",
      " |  kernel = build(self, dump_input=True, parse_arg=True, verbose=None, output=None, max_memory=None, atom=None, basis=None, unit=None, nucmod=None, ecp=None, charge=None, spin=0, symmetry=None, symmetry_subgroup=None, cart=None)\n",
      " |  \n",
      " |  loads_(self, molstr)\n",
      " |      classmethod(function) -> method\n",
      " |      \n",
      " |      Convert a function to be a class method.\n",
      " |      \n",
      " |      A class method receives the class as implicit first argument,\n",
      " |      just like an instance method receives the instance.\n",
      " |      To declare a class method, use this idiom:\n",
      " |      \n",
      " |        class C:\n",
      " |            @classmethod\n",
      " |            def f(cls, arg1, arg2, ...):\n",
      " |                ...\n",
      " |      \n",
      " |      It can be called either on the class (e.g. C.f()) or on an instance\n",
      " |      (e.g. C().f()).  The instance is ignored except for its class.\n",
      " |      If a class method is called for a derived class, the derived class\n",
      " |      object is passed as the implied first argument.\n",
      " |      \n",
      " |      Class methods are different than C++ or Java static methods.\n",
      " |      If you want those, see the staticmethod builtin.\n",
      " |  \n",
      " |  make_atm_env(self, atom, ptr=0, nucmod=1, nucprop=None)\n",
      " |      Convert the internal format :attr:`Mole._atom` to the format required\n",
      " |      by ``libcint`` integrals\n",
      " |  \n",
      " |  make_bas_env(self, basis_add, atom_id=0, ptr=0)\n",
      " |      Convert :attr:`Mole.basis` to the argument ``bas`` for ``libcint`` integrals\n",
      " |  \n",
      " |  make_ecp_env(self, _atm, _ecp, pre_env=[])\n",
      " |      Generate the input arguments _ecpbas for ECP integrals\n",
      " |  \n",
      " |  make_env(self, atoms, basis, pre_env=[], nucmod={}, nucprop=None)\n",
      " |      Generate the input arguments for ``libcint`` library based on internal\n",
      " |      format :attr:`Mole._atom` and :attr:`Mole._basis`\n",
      " |  \n",
      " |  nao_2c(mol)\n",
      " |      Total number of contracted spinor GTOs for the given :class:`Mole` object\n",
      " |  \n",
      " |  nao_2c_range(mol, bas_id0, bas_id1)\n",
      " |      Lower and upper boundary of contracted spinor basis functions associated\n",
      " |      with the given shell range\n",
      " |      \n",
      " |      Args:\n",
      " |          mol :\n",
      " |              :class:`Mole` object\n",
      " |          bas_id0 : int\n",
      " |              start shell id, 0-based\n",
      " |          bas_id1 : int\n",
      " |              stop shell id, 0-based\n",
      " |      \n",
      " |      Returns:\n",
      " |          tupel of start basis function id and the stop function id\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      >>> mol = gto.M(atom='O 0 0 0; C 0 0 1', basis='6-31g')\n",
      " |      >>> gto.nao_2c_range(mol, 2, 4)\n",
      " |      (4, 12)\n",
      " |  \n",
      " |  nao_cart(mol)\n",
      " |      Total number of contracted cartesian GTOs for the given :class:`Mole` object\n",
      " |  \n",
      " |  nao_nr(mol, cart=None)\n",
      " |      Total number of contracted GTOs for the given :class:`Mole` object\n",
      " |  \n",
      " |  nao_nr_range(mol, bas_id0, bas_id1)\n",
      " |      Lower and upper boundary of contracted spherical basis functions associated\n",
      " |      with the given shell range\n",
      " |      \n",
      " |      Args:\n",
      " |          mol :\n",
      " |              :class:`Mole` object\n",
      " |          bas_id0 : int\n",
      " |              start shell id\n",
      " |          bas_id1 : int\n",
      " |              stop shell id\n",
      " |      \n",
      " |      Returns:\n",
      " |          tupel of start basis function id and the stop function id\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      >>> mol = gto.M(atom='O 0 0 0; C 0 0 1', basis='6-31g')\n",
      " |      >>> gto.nao_nr_range(mol, 2, 4)\n",
      " |      (2, 6)\n",
      " |  \n",
      " |  npgto_nr(mol, cart=None)\n",
      " |      Total number of primitive spherical GTOs for the given :class:`Mole` object\n",
      " |  \n",
      " |  offset_2c_by_atom(mol)\n",
      " |      2-component AO offset for each atom.  Return a list, each item\n",
      " |      of the list gives (start-shell-id, stop-shell-id, start-AO-id, stop-AO-id)\n",
      " |  \n",
      " |  offset_ao_by_atom = aoslice_by_atom(mol, ao_loc=None)\n",
      " |  \n",
      " |  offset_nr_by_atom = aoslice_by_atom(mol, ao_loc=None)\n",
      " |  \n",
      " |  pack(mol)\n",
      " |      Pack the input args of :class:`Mole` to a dict.\n",
      " |      \n",
      " |      Note this function only pack the input arguments (not the entire Mole\n",
      " |      class).  Modifications to mol._atm, mol._bas, mol._env are not tracked.\n",
      " |      Use :func:`dumps` to serialize the entire Mole object.\n",
      " |  \n",
      " |  search_ao_label(mol, label)\n",
      " |      Find the index of the AO basis function based on the given ao_label\n",
      " |      \n",
      " |      Args:\n",
      " |          ao_label : string or a list of strings\n",
      " |              The regular expression pattern to match the orbital labels\n",
      " |              returned by mol.ao_labels()\n",
      " |      \n",
      " |      Returns:\n",
      " |          A list of index for the AOs that matches the given ao_label RE pattern\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      >>> mol = gto.M(atom='H 0 0 0; Cl 0 0 1', basis='ccpvtz')\n",
      " |      >>> mol.search_ao_label('Cl.*p')\n",
      " |      [19 20 21 22 23 24 25 26 27 28 29 30]\n",
      " |      >>> mol.search_ao_label('Cl 2p')\n",
      " |      [19 20 21]\n",
      " |      >>> mol.search_ao_label(['Cl.*d', 'Cl 4p'])\n",
      " |      [25 26 27 31 32 33 34 35 36 37 38 39 40]\n",
      " |  \n",
      " |  search_ao_nr(mol, atm_id, l, m, atmshell)\n",
      " |      Search the first basis function id (**not** the shell id) which matches\n",
      " |      the given atom-id, angular momentum magnetic angular momentum, principal shell.\n",
      " |      \n",
      " |      Args:\n",
      " |          atm_id : int\n",
      " |              atom id, 0-based\n",
      " |          l : int\n",
      " |              angular momentum\n",
      " |          m : int\n",
      " |              magnetic angular momentum\n",
      " |          atmshell : int\n",
      " |              principal quantum number\n",
      " |      \n",
      " |      Returns:\n",
      " |          basis function id, 0-based.  If not found, return None\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      >>> mol = gto.M(atom='H 0 0 0; Cl 0 0 1', basis='sto-3g')\n",
      " |      >>> mol.search_ao_nr(1, 1, -1, 3) # Cl 3px\n",
      " |      7\n",
      " |  \n",
      " |  search_ao_r(mol, atm_id, l, j, m, atmshell)\n",
      " |  \n",
      " |  search_shell_id(self, atm_id, l)\n",
      " |  \n",
      " |  set_common_orig = set_common_origin(self, coord)\n",
      " |  \n",
      " |  set_common_orig_ = set_common_origin(self, coord)\n",
      " |  \n",
      " |  set_common_origin(self, coord)\n",
      " |      Update common origin for integrals of dipole, rxp etc.\n",
      " |      **Note** the unit of the coordinates needs to be Bohr\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      >>> mol.set_common_origin(0)\n",
      " |      >>> mol.set_common_origin((1,0,0))\n",
      " |  \n",
      " |  set_common_origin_ = set_common_origin(self, coord)\n",
      " |  \n",
      " |  set_f12_zeta(self, zeta)\n",
      " |      Set zeta for YP exp(-zeta r12)/r12 or STG exp(-zeta r12) type integrals\n",
      " |  \n",
      " |  set_geom_(self, atoms_or_coords, unit=None, symmetry=None, inplace=True)\n",
      " |      Update geometry\n",
      " |  \n",
      " |  set_nuc_mod(self, atm_id, zeta)\n",
      " |      Change the nuclear charge distribution of the given atom ID.  The charge\n",
      " |      distribution is defined as: rho(r) = nuc_charge * Norm * exp(-zeta * r^2).\n",
      " |      This function can **only** be called after .build() method is executed.\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      >>> for ia in range(mol.natm):\n",
      " |      ...     zeta = gto.filatov_nuc_mod(mol.atom_charge(ia))\n",
      " |      ...     mol.set_nuc_mod(ia, zeta)\n",
      " |  \n",
      " |  set_nuc_mod_ = set_nuc_mod(self, atm_id, zeta)\n",
      " |  \n",
      " |  set_range_coulomb(self, omega)\n",
      " |      Switch on range-separated Coulomb operator for **all** 2e integrals\n",
      " |      \n",
      " |      Args:\n",
      " |          omega : double\n",
      " |      \n",
      " |              | = 0 : Regular electron repulsion integral\n",
      " |              | > 0 : Long-range operator  erf(omega r12) / r12\n",
      " |              | < 0 : Short-range operator  erfc(omega r12) /r12\n",
      " |  \n",
      " |  set_range_coulomb_ = set_range_coulomb(self, omega)\n",
      " |  \n",
      " |  set_rinv_orig = set_rinv_origin(self, coord)\n",
      " |  \n",
      " |  set_rinv_orig_ = set_rinv_origin(self, coord)\n",
      " |  \n",
      " |  set_rinv_origin(self, coord)\n",
      " |      Update origin for operator :math:`\\frac{1}{|r-R_O|}`.\n",
      " |      **Note** the unit is Bohr\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      >>> mol.set_rinv_origin(0)\n",
      " |      >>> mol.set_rinv_origin((0,1,0))\n",
      " |  \n",
      " |  set_rinv_origin_ = set_rinv_origin(self, coord)\n",
      " |  \n",
      " |  set_rinv_zeta(self, zeta)\n",
      " |      Assume the charge distribution on the \"rinv_origin\".  zeta is the parameter\n",
      " |      to control the charge distribution: rho(r) = Norm * exp(-zeta * r^2).\n",
      " |      **Be careful** when call this function. It affects the behavior of\n",
      " |      int1e_rinv_* functions.  Make sure to set it back to 0 after using it!\n",
      " |  \n",
      " |  set_rinv_zeta_ = set_rinv_zeta(self, zeta)\n",
      " |  \n",
      " |  sph2spinor_coeff(self)\n",
      " |      Transformation matrix that transforms real-spherical GTOs to spinor\n",
      " |      GTOs for all basis functions\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      >>> mol = gto.M(atom='H 0 0 0; F 0 0 1', basis='ccpvtz')\n",
      " |      >>> ca, cb = mol.sph2spinor_coeff()\n",
      " |      >>> s0 = mol.intor('int1e_ovlp_spinor')\n",
      " |      >>> s1 = ca.conj().T.dot(mol.intor('int1e_ovlp_sph')).dot(ca)\n",
      " |      >>> s1+= cb.conj().T.dot(mol.intor('int1e_ovlp_sph')).dot(cb)\n",
      " |      >>> print(abs(s1-s0).max())\n",
      " |      >>> 6.66133814775e-16\n",
      " |  \n",
      " |  sph_labels(mol, fmt=True, base=0)\n",
      " |      Labels for spherical GTO functions\n",
      " |      \n",
      " |      Kwargs:\n",
      " |          fmt : str or bool\n",
      " |          if fmt is boolean, it controls whether to format the labels and the\n",
      " |          default format is \"%d%3s %s%-4s\".  if fmt is string, the string will\n",
      " |          be used as the print format.\n",
      " |      \n",
      " |      Returns:\n",
      " |          List of [(atom-id, symbol-str, nl-str, str-of-real-spherical-notation]\n",
      " |          or formatted strings based on the argument \"fmt\"\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      >>> mol = gto.M(atom='H 0 0 0; Cl 0 0 1', basis='sto-3g')\n",
      " |      >>> gto.sph_labels(mol)\n",
      " |      [(0, 'H', '1s', ''), (1, 'Cl', '1s', ''), (1, 'Cl', '2s', ''), (1, 'Cl', '3s', ''),\n",
      " |       (1, 'Cl', '2p', 'x'), (1, 'Cl', '2p', 'y'), (1, 'Cl', '2p', 'z'), (1, 'Cl', '3p', 'x'),\n",
      " |       (1, 'Cl', '3p', 'y'), (1, 'Cl', '3p', 'z')]\n",
      " |  \n",
      " |  spheric_labels = sph_labels(mol, fmt=True, base=0)\n",
      " |  \n",
      " |  spinor_labels(mol, fmt=True, base=0)\n",
      " |      Labels of spinor GTO functions\n",
      " |  \n",
      " |  time_reversal_map(mol)\n",
      " |      The index to map the spinor functions and its time reversal counterpart.\n",
      " |      The returned indices have postive or negative values.  For the i-th basis function,\n",
      " |      if the returned j = idx[i] < 0, it means :math:`T|i\\rangle = -|j\\rangle`,\n",
      " |      otherwise :math:`T|i\\rangle = |j\\rangle`\n",
      " |  \n",
      " |  tmap = time_reversal_map(mol)\n",
      " |  \n",
      " |  to_uncontracted_cartesian_basis(mol)\n",
      " |      Decontract the basis of a Mole or a Cell.  Returns a Mole (Cell) object\n",
      " |      with the uncontracted basis environment and a list of coefficients that\n",
      " |      transform the uncontracted cartesian basis to the original basis.  Each\n",
      " |      element in the list corresponds to one shell of the original Mole (Cell).\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      >>> mol = gto.M(atom='Ne', basis='ccpvdz')\n",
      " |      >>> pmol, ctr_coeff = mol.to_uncontracted_cartesian_basis()\n",
      " |      >>> c = scipy.linalg.block_diag(*ctr_coeff)\n",
      " |      >>> s = reduce(numpy.dot, (c.T, pmol.intor('int1e_ovlp'), c))\n",
      " |      >>> abs(s-mol.intor('int1e_ovlp')).max()\n",
      " |      0.0\n",
      " |  \n",
      " |  tofile(mol, filename, format=None)\n",
      " |      Write molecular geometry to a file of the required format.\n",
      " |      \n",
      " |      Supported output formats:\n",
      " |          | raw: Each line is  <symobl> <x> <y> <z>\n",
      " |          | xyz: XYZ cartesian coordinates format\n",
      " |          | zmat: Z-matrix format\n",
      " |  \n",
      " |  tostring(mol, format='raw')\n",
      " |      Convert molecular geometry to a string of the required format.\n",
      " |      \n",
      " |      Supported output formats:\n",
      " |          | raw: Each line is  <symobl> <x> <y> <z>\n",
      " |          | xyz: XYZ cartesian coordinates format\n",
      " |          | zmat: Z-matrix format\n",
      " |  \n",
      " |  tot_electrons(mol)\n",
      " |      Total number of electrons for the given molecule\n",
      " |      \n",
      " |      Returns:\n",
      " |          electron number in integer\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      >>> mol = gto.M(atom='H 0 1 0; C 0 0 1', charge=1)\n",
      " |      >>> mol.tot_electrons()\n",
      " |      6\n",
      " |  \n",
      " |  unpack_(self, moldic)\n",
      " |      classmethod(function) -> method\n",
      " |      \n",
      " |      Convert a function to be a class method.\n",
      " |      \n",
      " |      A class method receives the class as implicit first argument,\n",
      " |      just like an instance method receives the instance.\n",
      " |      To declare a class method, use this idiom:\n",
      " |      \n",
      " |        class C:\n",
      " |            @classmethod\n",
      " |            def f(cls, arg1, arg2, ...):\n",
      " |                ...\n",
      " |      \n",
      " |      It can be called either on the class (e.g. C.f()) or on an instance\n",
      " |      (e.g. C().f()).  The instance is ignored except for its class.\n",
      " |      If a class method is called for a derived class, the derived class\n",
      " |      object is passed as the implied first argument.\n",
      " |      \n",
      " |      Class methods are different than C++ or Java static methods.\n",
      " |      If you want those, see the staticmethod builtin.\n",
      " |  \n",
      " |  update(self, chkfile)\n",
      " |  \n",
      " |  update_from_chk(self, chkfile)\n",
      " |  \n",
      " |  with_common_orig = with_common_origin(self, coord)\n",
      " |  \n",
      " |  with_common_origin(self, coord)\n",
      " |      Retuen a temporary mol context which has the rquired common origin.\n",
      " |      The required common origin has no effects out of the temporary context.\n",
      " |      See also :func:`mol.set_common_origin`\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      >>> with mol.with_common_origin((1,0,0)):\n",
      " |      ...     mol.intor('int1e_r', comp=3)\n",
      " |  \n",
      " |  with_integral_screen(self, threshold)\n",
      " |      Retuen a temporary mol context which has the rquired integral\n",
      " |      screen threshold\n",
      " |  \n",
      " |  with_long_range_coulomb(self, omega)\n",
      " |      Retuen a temporary mol context for long-range part of\n",
      " |      range-separated Coulomb operator.\n",
      " |  \n",
      " |  with_range_coulomb(self, omega)\n",
      " |      Retuen a temporary mol context which sets the required parameter\n",
      " |      omega for range-separated Coulomb operator.\n",
      " |      If omega = None, return the context for regular Coulomb integrals.\n",
      " |      See also :func:`mol.set_range_coulomb`\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      >>> with mol.with_range_coulomb(omega=1.5):\n",
      " |      ...     mol.intor('int2e')\n",
      " |  \n",
      " |  with_rinv_as_nucleus = with_rinv_at_nucleus(self, atm_id)\n",
      " |  \n",
      " |  with_rinv_at_nucleus(self, atm_id)\n",
      " |      Retuen a temporary mol context in which the rinv operator (1/r) is\n",
      " |      treated like the Coulomb potential of a Gaussian charge distribution\n",
      " |      rho(r) = Norm * exp(-zeta * r^2) at the place of the input atm_id.\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      >>> with mol.with_rinv_at_nucleus(3):\n",
      " |      ...     mol.intor('int1e_rinv')\n",
      " |  \n",
      " |  with_rinv_orig = with_rinv_origin(self, coord)\n",
      " |  \n",
      " |  with_rinv_origin(self, coord)\n",
      " |      Retuen a temporary mol context which has the rquired origin of 1/r\n",
      " |      operator.  The required origin has no effects out of the temporary\n",
      " |      context.  See also :func:`mol.set_rinv_origin`\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      >>> with mol.with_rinv_origin((1,0,0)):\n",
      " |      ...     mol.intor('int1e_rinv')\n",
      " |  \n",
      " |  with_rinv_zeta(self, zeta)\n",
      " |      Retuen a temporary mol context which has the rquired Gaussian charge\n",
      " |      distribution placed at \"rinv_origin\": rho(r) = Norm * exp(-zeta * r^2).\n",
      " |      See also :func:`mol.set_rinv_zeta`\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      >>> with mol.with_rinv_zeta(zeta=1.5), mol.with_rinv_origin((1.,0,0)):\n",
      " |      ...     mol.intor('int1e_rinv')\n",
      " |  \n",
      " |  with_short_range_coulomb(self, omega)\n",
      " |      Retuen a temporary mol context for short-range part of\n",
      " |      range-separated Coulomb operator.\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Class methods defined here:\n",
      " |  \n",
      " |  loads(molstr) from builtins.type\n",
      " |      Deserialize a str containing a JSON document to a Mole object.\n",
      " |  \n",
      " |  unpack(moldic) from builtins.type\n",
      " |      Unpack a dict which is packed by :func:`pack`, to generate the input\n",
      " |      arguments for :class:`Mole` object.\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Data descriptors defined here:\n",
      " |  \n",
      " |  ao_loc\n",
      " |      Offset of every shell in the spherical basis function spectrum\n",
      " |      \n",
      " |      Returns:\n",
      " |          list, each entry is the corresponding start basis function id\n",
      " |      \n",
      " |      Examples:\n",
      " |      \n",
      " |      >>> mol = gto.M(atom='O 0 0 0; C 0 0 1', basis='6-31g')\n",
      " |      >>> gto.ao_loc_nr(mol)\n",
      " |      [0, 1, 2, 3, 6, 9, 10, 11, 12, 15, 18]\n",
      " |  \n",
      " |  elements\n",
      " |      A list of elements in the molecule\n",
      " |  \n",
      " |  ms\n",
      " |      Spin quantum number. multiplicity = ms*2+1\n",
      " |  \n",
      " |  multiplicity\n",
      " |  \n",
      " |  nao\n",
      " |  \n",
      " |  natm\n",
      " |  \n",
      " |  nbas\n",
      " |  \n",
      " |  nelec\n",
      " |  \n",
      " |  nelectron\n",
      " |  \n",
      " |  omega\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Data and other attributes defined here:\n",
      " |  \n",
      " |  __slotnames__ = []\n",
      " |  \n",
      " |  cart = False\n",
      " |  \n",
      " |  incore_anyway = False\n",
      " |  \n",
      " |  unit = 'angstrom'\n",
      " |  \n",
      " |  verbose = 3\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Methods inherited from pyscf.lib.misc.StreamObject:\n",
      " |  \n",
      " |  __call__ = set(self, *args, **kwargs)\n",
      " |  \n",
      " |  check_sanity(self)\n",
      " |      Check input of class/object attributes, check whether a class method is\n",
      " |      overwritten.  It does not check the attributes which are prefixed with\n",
      " |      \"_\".  The\n",
      " |      return value of method set is the object itself.  This allows a series\n",
      " |      of functions/methods to be executed in pipe.\n",
      " |  \n",
      " |  post_kernel(self, envs)\n",
      " |      A hook to be run after the main body of the kernel function.  Internal\n",
      " |      variables are exposed to post_kernel through the \"envs\" dictionary.\n",
      " |      Return value of post_kernel function is not required.\n",
      " |  \n",
      " |  pre_kernel(self, envs)\n",
      " |      A hook to be run before the main body of kernel function is executed.\n",
      " |      Internal variables are exposed to pre_kernel through the \"envs\"\n",
      " |      dictionary.  Return value of pre_kernel function is not required.\n",
      " |  \n",
      " |  run(self, *args, **kwargs)\n",
      " |      Call the kernel function of current object.  `args` will be passed\n",
      " |      to kernel function.  `kwargs` will be used to update the attributes of\n",
      " |      current object.  The return value of method run is the object itself.\n",
      " |      This allows a series of functions/methods to be executed in pipe.\n",
      " |  \n",
      " |  set(self, *args, **kwargs)\n",
      " |      Update the attributes of the current object.  The return value of\n",
      " |      method set is the object itself.  This allows a series of\n",
      " |      functions/methods to be executed in pipe.\n",
      " |  \n",
      " |  view(self, cls)\n",
      " |      New view of object with the same attributes.\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Data descriptors inherited from pyscf.lib.misc.StreamObject:\n",
      " |  \n",
      " |  __dict__\n",
      " |      dictionary for instance variables (if defined)\n",
      " |  \n",
      " |  __weakref__\n",
      " |      list of weak references to the object (if defined)\n",
      " |  \n",
      " |  ----------------------------------------------------------------------\n",
      " |  Data and other attributes inherited from pyscf.lib.misc.StreamObject:\n",
      " |  \n",
      " |  stdout = <ipykernel.iostream.OutStream object>\n",
      "\n"
     ]
    }
   ],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.8"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
